package com.tcu.mosaicdemo;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

/**
 * Created by chenlong on 15/8/20.
 */
public class MosaicBlockActivity extends AppCompatActivity {
    public static final String INTENT_PATH = "_intent_path";
    private MosaicBlockView mMosaicBlockView;
    private String mPath;
    public static void navToMosaicBlockActivity(Context context,String path){
        Intent intent = new Intent(context,MosaicBlockActivity.class);
        intent.putExtra(INTENT_PATH,path);
        context.startActivity(intent);

    }
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_mosaic_single);
        if(getIntent().hasExtra(INTENT_PATH)){
            mPath = getIntent().getStringExtra(INTENT_PATH);
        }
        mMosaicBlockView = (MosaicBlockView)findViewById(R.id.mosaicviewsingle);
        mMosaicBlockView.setPath(mPath);

    }
}
